<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <title>社交活动平台 - 首页</title>
    <style>
        /* 重置样式 */
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
            background-color: #f5f7fa;
            color: #333;
            line-height: 1.6;
        }

        /* 容器样式 */
        .container {
            max-width: 480px;
            margin: 0 auto;
            background-color: #fff;
            min-height: 100vh;
        }

        /* 头部导航 */
        .header {
            position: sticky;
            top: 0;
            background: linear-gradient(135deg, #ff6b35 0%, #f9a825 100%);
            color: white;
            padding: 16px 16px 12px;
            box-shadow: 0 2px 10px rgba(255, 107, 53, 0.2);
            z-index: 100;
        }

        .header-content {
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .logo {
            font-size: 20px;
            font-weight: bold;
            display: flex;
            align-items: center;
        }

        .logo-icon {
            margin-right: 8px;
            font-size: 24px;
        }

        .header-actions {
            display: flex;
            gap: 16px;
        }

        .search-btn, .message-btn {
            background: rgba(255, 255, 255, 0.2);
            border: none;
            width: 36px;
            height: 36px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            font-size: 18px;
            cursor: pointer;
            transition: all 0.3s ease;
        }

        .search-btn:hover, .message-btn:hover {
            background: rgba(255, 255, 255, 0.3);
            transform: scale(1.05);
        }

        /* 时间轴导航 */
        .time-nav {
            display: flex;
            overflow-x: auto;
            padding: 12px 16px;
            background-color: #fff;
            border-bottom: 1px solid #eee;
        }

        .time-item {
            padding: 8px 16px;
            margin-right: 8px;
            border-radius: 20px;
            font-size: 14px;
            white-space: nowrap;
            cursor: pointer;
            transition: all 0.3s ease;
        }

        .time-item.active {
            background-color: #ff6b35;
            color: white;
        }

        .time-item:not(.active):hover {
            background-color: #f0f0f0;
        }

        /* 活动卡片容器 */
        .activity-list {
            padding: 16px;
        }

        /* 活动卡片 */
        .activity-card {
            background: white;
            border-radius: 16px;
            overflow: hidden;
            margin-bottom: 20px;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
            transition: all 0.3s ease;
            position: relative;
        }

        .activity-card:hover {
            transform: translateY(-2px);
            box-shadow: 0 6px 16px rgba(0, 0, 20, 0.1);
        }

        /* 卡片封面 */
        .activity-cover {
            width: 100%;
            height: 200px;
            object-fit: cover;
        }

        /* 卡片内容 */
        .activity-content {
            padding: 16px;
        }

        .activity-title {
            font-size: 18px;
            font-weight: bold;
            margin-bottom: 8px;
            color: #333;
        }

        .activity-meta {
            display: flex;
            align-items: center;
            gap: 12px;
            margin-bottom: 12px;
            font-size: 14px;
            color: #666;
        }

        .meta-item {
            display: flex;
            align-items: center;
        }

        .meta-icon {
            margin-right: 4px;
            font-size: 16px;
        }

        /* 活动标签 */
        .activity-tags {
            display: flex;
            gap: 8px;
            margin-bottom: 12px;
        }

        .tag {
            background-color: #f0f8ff;
            color: #45b7d1;
            padding: 4px 12px;
            border-radius: 12px;
            font-size: 12px;
        }

        /* 社交温度标签 */
        .activity-temperature {
            display: inline-block;
            padding: 4px 10px;
            border-radius: 12px;
            font-size: 12px;
            font-weight: bold;
            margin-bottom: 12px;
        }

        .temperature-hot {
            background-color: #ffebee;
            color: #e53935;
        }

        .temperature-warm {
            background-color: #fff8e1;
            color: #ff8f00;
        }

        .temperature-calm {
            background-color: #e8f5e9;
            color: #388e3c;
        }

        /* 参与统计 */
        .activity-stats {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 16px;
        }

        .participants {
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .avatar-group {
            display: flex;
            align-items: center;
        }

        .avatar-item {
            width: 24px;
            height: 24px;
            border-radius: 50%;
            background-color: #e0e0e0;
            border: 2px solid white;
            margin-left: -8px;
        }

        .avatar-item:first-child {
            margin-left: 0;
        }

        .participant-count {
            font-size: 14px;
            color: #666;
        }

        /* 报名按钮 */
        .register-btn {
            background: linear-gradient(135deg, #ff6b35 0%, #f9a825 100%);
            color: white;
            border: none;
            padding: 8px 24px;
            border-radius: 20px;
            font-size: 14px;
            font-weight: bold;
            cursor: pointer;
            transition: all 0.3s ease;
            box-shadow: 0 2px 8px rgba(255, 107, 53, 0.3);
        }

        .register-btn:hover {
            transform: scale(1.05);
            box-shadow: 0 4px 12px rgba(255, 107, 53, 0.4);
        }

        .register-btn.registered {
            background: #9e9e9e;
            cursor: default;
        }

        .register-btn.registered:hover {
            transform: none;
            box-shadow: 0 2px 8px rgba(158, 158, 158, 0.3);
        }

        /* 底部导航 */
        .bottom-nav {
            position: fixed;
            bottom: 0;
            left: 0;
            right: 0;
            background-color: white;
            border-top: 1px solid #eee;
            display: flex;
            justify-content: space-around;
            padding: 12px 0;
            z-index: 100;
        }

        .nav-item {
            display: flex;
            flex-direction: column;
            align-items: center;
            color: #9e9e9e;
            font-size: 12px;
            cursor: pointer;
            transition: all 0.3s ease;
        }

        .nav-item.active {
            color: #ff6b35;
        }

        .nav-icon {
            font-size: 20px;
            margin-bottom: 4px;
        }

        /* 加载动画 */
        .loading {
            text-align: center;
            padding: 20px;
            color: #9e9e9e;
        }

        .spinner {
            width: 24px;
            height: 24px;
            border: 3px solid #f3f3f3;
            border-top: 3px solid #ff6b35;
            border-radius: 50%;
            animation: spin 1s linear infinite;
            margin: 0 auto 10px;
        }

        @keyframes spin {
            0% { transform: rotate(0deg); }
            100% { transform: rotate(360deg); }
        }

        /* 弹窗样式 */
        .modal {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background-color: rgba(0, 0, 0, 0.5);
            z-index: 1000;
            justify-content: center;
            align-items: center;
        }

        .modal-content {
            background-color: white;
            border-radius: 16px;
            width: 85%;
            max-width: 320px;
            padding: 24px;
            text-align: center;
            transform: translateY(20px);
            opacity: 0;
            transition: all 0.3s ease;
        }

        .modal.show {
            transform: translateY(0);
            opacity: 1;
        }

        .modal-title {
            font-size: 18px;
            font-weight: bold;
            margin-bottom: 16px;
            color: #333;
        }

        .modal-message {
            margin-bottom: 24px;
            color: #666;
        }

        .modal-actions {
            display: flex;
            gap: 12px;
        }

        .modal-btn {
            flex: 1;
            padding: 12px;
            border-radius: 8px;
            font-weight: bold;
            cursor: pointer;
            transition: all 0.3s ease;
        }

        .cancel-btn {
            background-color: #f5f5f5;
            color: #666;
        }

        .confirm-btn {
            background: linear-gradient(135deg, #ff6b35 0%, #f9a825 100%);
            color: white;
        }

        /* 响应式适配 */
        @media (max-width: 480px) {
            .activity-cover {
                height: 180px;
            }
            
            .header-content {
                padding-top: 4px;
            }
        }

        /* 活动卡片动画 */
        @keyframes cardAppear {
            from {
                opacity: 0;
                transform: translateY(20px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        .activity-card {
            animation: cardAppear 0.5s ease forwards;
        }

        /* 按钮状态动画 */
        .register-btn {
            animation: buttonPulse 2s infinite;
        }

        @keyframes buttonPulse {
            0% { box-shadow: 0 2px 8px rgba(255, 107, 53, 0.3); }
            50% { box-shadow: 0 2px 12px rgba(255, 107, 53, 0.6); }
            100% { box-shadow: 0 2px 8px rgba(255, 107, 53, 0.3); }
        }

        /* 活动类型标签颜色 */
        .tag-sport { background-color: #e3f2fd; color: #1976d2; }
        .tag-learning { background-color: #f3e5f5; color: #7b1fa2; }
        .tag-social { background-color: #e8f5e9; color: #388e3c; }
        .tag-food { background-color: #fff3e0; color: #f57c00; }
        .tag-culture { background-color: #fce4ec; color: #c2185b; }
        .tag-outdoor { background-color: #e0f2f1; color: #00796b; }
    </style>
</head>
<body>
    <div class="container">
        <!-- 头部导航 -->
        <header class="header">
            <div class="header-content">
                <div class="logo">
                    <span class="logo-icon">🎉</span>
                    <span>社交圈</span>
                </div>
                <div class="header-actions">
                    <button class="search-btn" id="searchBtn">🔍</button>
                    <button class="message-btn" id="messageBtn">💬</button>
                </div>
            </div>
        </header>

        <!-- 时间轴导航 -->
        <div class="time-nav" id="timeNav">
            <div class="time-item active" data-time="today">今天</div>
            <div class="time-item" data-time="tomorrow">明天</div>
            <div class="time-item" data-time="week">本周</div>
            <div class="time-item" data-time="month">本月</div>
            <div class="time-item" data-time="all">全部</div>
        </div>

        <!-- 活动列表 -->
        <div class="activity-list" id="activityList">
            <!-- 活动卡片 1 -->
            <div class="activity-card" data-activity-id="1">
                <img src="https://images.unsplash.com/photo-1501854140801-50d01698950b?w=400&h=200&fit=crop" alt="户外徒步活动" class="activity-cover">
                <div class="activity-content">
                    <h3 class="activity-title">周末户外徒步活动</h3>
                    <div class="activity-meta">
                        <div class="meta-item">
                            <span class="meta-icon">📍</span>
                            <span>城市公园</span>
                        </div>
                        <div class="meta-item">
                            <span class="meta-icon">⏰</span>
                            <span>周六 14:00</span>
                        </div>
                    </div>
                    
                    <div class="activity-temperature temperature-hot">🔥 热门活跃</div>
                    
                    <div class="activity-tags">
                        <span class="tag tag-sport">运动</span>
                        <span class="tag tag-outdoor">户外</span>
                    </div>
                    
                    <div class="activity-stats">
                        <div class="participants">
                            <div class="avatar-group">
                                <div class="avatar-item" style="background-color: #42b983;"></div>
                                <div class="avatar-item" style="background-color: #ff6b35;"></div>
                                <div class="avatar-item" style="background-color: #45b7d1;"></div>
                                <div class="avatar-item" style="background-color: #9c27b0;"></div>
                            </div>
                            <span class="participant-count">12人参与</span>
                        </div>
                        <button class="register-btn" data-action="register">报名参加</button>
                    </div>
                </div>
            </div>

            <!-- 活动卡片 2 -->
            <div class="activity-card" data-activity-id="2">
                <img src="https://images.unsplash.com/photo-1504805572947-34fad45aed93?w=400&h=200&fit=crop" alt="读书分享会" class="activity-cover">
                <div class="activity-content">
                    <h3 class="activity-title">经典小说读书分享会</h3>
                    <div class="activity-meta">
                        <div class="meta-item">
                            <span class="meta-icon">📍</span>
                            <span>咖啡书店</span>
                        </div>
                        <div class="meta-item">
                            <span class="meta-icon">⏰</span>
                            <span>周五 19:30</span>
                        </div>
                    </div>
                    
                    <div class="activity-temperature temperature-warm">🌟 温暖友好</div>
                    
                    <div class="activity-tags">
                        <span class="tag tag-learning">学习</span>
                        <span class="tag tag-social">社交</span>
                    </div>
                    
                    <div class="activity-stats">
                        <div class="participants">
                            <div class="avatar-group">
                                <div class="avatar-item" style="background-color: #ff9800;"></div>
                                <div class="avatar-item" style="background-color: #795548;"></div>
                                <div class="avatar-item" style="background-color: #607d8b;"></div>
                            </div>
                            <span class="participant-count">8人参与</span>
                        </div>
                        <button class="register-btn registered" data-action="registered">已报名</button>
                    </div>
                </div>
            </div>

            <!-- 活动卡片 3 -->
            <div class="activity-card" data-activity-id="3">
                <img src="https://images.unsplash.com/photo-1543269865-cbf427effbad?w=400&h=200&fit=crop" alt="摄影交流会" class="activity-cover">
                <div class="activity-content">
                    <h3 class="activity-title">周末摄影交流会</h3>
                    <div class="activity-meta">
                        <div class="meta-item">
                            <span class="meta-icon">📍</span>
                            <span>城市广场</span>
                        </div>
                        <div class="meta-item">
                            <span class="meta-icon">⏰</span>
                            <span>周日 10:00</span>
                        </div>
                    </div>
                    
                    <div class="activity-temperature temperature-calm">💫 精致优雅</div>
                    
                    <div class="activity-tags">
                        <span class="tag tag-culture">文化</span>
                        <span class="tag tag-social">社交</span>
                    </div>
                    
                    <div class="activity-stats">
                        <div class="participants">
                            <div class="avatar-group">
                                <div class="avatar-item" style="background-color: #3f51b5;"></div>
                                <div class="avatar-item" style="background-color: #e91e63;"></div>
                                <div class="avatar-item" style="background-color: #009688;"></div>
                                <div class="avatar-item" style="background-color: #ff5722;"></div>
                                <div class="avatar-item" style="background-color: #9e9e9e;"></div>
                            </div>
                            <span class="participant-count">25人参与</span>
                        </div>
                        <button class="register-btn" data-action="register">报名参加</button>
                    </div>
                </div>
            </div>

            <!-- 活动卡片 4 -->
            <div class="activity-card" data-activity-id="4">
                <img src="https://images.unsplash.com/photo-1503376780353-7e6692767b70?w=400&h=200&fit=crop" alt="美食探店" class="activity-cover">
                <div class="activity-content">
                    <h3 class="activity-title">城市美食探店之旅</h3>
                    <div class="activity-meta">
                        <div class="meta-item">
                            <span class="meta-icon">📍</span>
                            <span>美食街</span>
                        </div>
                        <div class="meta-item">
                            <span class="meta-icon">⏰</span>
                            <span>周六 18:00</span>
                        </div>
                    </div>
                    
                    <div class="activity-temperature temperature-hot">🔥 热门活跃</div>
                    
                    <div class="activity-tags">
                        <span class="tag tag-food">美食</span>
                        <span class="tag tag-social">社交</span>
                    </div>
                    
                    <div class="activity-stats">
                        <div class="participants">
                            <div class="avatar-group">
                                <div class="avatar-item" style="background-color: #2196f3;"></div>
                                <div class="avatar-item" style="background-color: #8bc34a;"></div>
                                <div class="avatar-item" style="background-color: #ffeb3b;"></div>
                            </div>
                            <span class="participant-count">15人参与</span>
                        </div>
                        <button class="register-btn" data-action="register">报名参加</button>
                    </div>
                </div>
            </div>

            <!-- 活动卡片 5 -->
            <div class="activity-card" data-activity-id="5">
                <img src="https://images.unsplash.com/photo-1493246507139-91e8fad9978e?w=400&h=200&fit=crop" alt="手工制作" class="activity-cover">
                <div class="activity-content">
                    <h3 class="activity-title">手工制作DIY工作坊</h3>
                    <div class="activity-meta">
                        <div class="meta-item">
                            <span class="meta-icon">📍</span>
                            <span>创意工坊</span>
                        </div>
                        <div class="meta-item">
                            <span class="meta-icon">⏰</span>
                            <span>周日 14:00</span>
                        </div>
                    </div>
                    
                    <div class="activity-temperature temperature-warm">🌟 温暖友好</div>
                    
                    <div class="activity-tags">
                        <span class="tag tag-culture">文化</span>
                        <span class="tag tag-social">社交</span>
                    </div>
                    
                    <div class="activity-stats">
                        <div class="participants">
                            <div class="avatar-group">
                                <div class="avatar-item" style="background-color: #ff5722;"></div>
                                <div class="avatar-item" style="background-color: #9c27b0;"></div>
                            </div>
                            <span class="participant-count">6人参与</span>
                        </div>
                        <button class="register-btn" data-action="register">报名参加</button>
                    </div>
                </div>
            </div>
        </div>

        <!-- 底部导航 -->
        <nav class="bottom-nav">
            <div class="nav-item active" data-page="home">
                <span class="nav-icon">🏠</span>
                <span>首页</span>
            </div>
            <div class="nav-item" data-page="search">
                <span class="nav-icon">🔍</span>
                <span>搜索</span>
            </div>
            <div class="nav-item" data-page="publish">
                <span class="nav-icon">➕</span>
                <span>发布</span>
            </div>
            <div class="nav-item" data-page="profile">
                <span class="nav-icon">👤</span>
                <span>我的</span>
            </div>
        </nav>

        <!-- 报名确认弹窗 -->
        <div class="modal" id="registerModal">
            <div class="modal-content">
                <h3 class="modal-title">确认报名</h3>
                <p class="modal-message" id="modalMessage">您确定要报名参加这个活动吗？</p>
                <div class="modal-actions">
                    <button class="modal-btn cancel-btn" id="cancelBtn">取消</button>
                    <button class="modal-btn confirm-btn" id="confirmBtn">确认报名</button>
                </div>
            </div>
        </div>

        <!-- 加载状态 -->
        <div class="loading" id="loadingIndicator">
            <div class="spinner"></div>
            <p>加载中...</p>
        </div>
    </div>

    <script>
        // 全局变量
        let currentActivityId = null;
        let currentUserRegistered = new Set([2]); // 模拟已报名的活动ID

        // 初始化
        document.addEventListener('DOMContentLoaded', function() {
            initEventListeners();
            simulateLoading();
        });

        // 初始化事件监听器
        function initEventListeners() {
            // 时间轴切换
            const timeItems = document.querySelectorAll('.time-item');
            timeItems.forEach(item => {
                item.addEventListener('click', function() {
                    // 移除所有激活状态
                    timeItems.forEach(i => i.classList.remove('active'));
                    // 添加当前激活状态
                    this.classList.add('active');
                    
                    // 模拟时间筛选效果（实际应用中会调用API）
                    showLoading();
                    setTimeout(() => {
                        hideLoading();
                        // 这里可以添加筛选逻辑
                        alert(`切换到 ${this.textContent} 的活动`);
                    }, 800);
                });
            });

            // 活动报名按钮
            const registerButtons = document.querySelectorAll('.register-btn');
            registerButtons.forEach(button => {
                button.addEventListener('click', function(e) {
                    e.stopPropagation();
                    
                    const activityCard = this.closest('.activity-card');
                    const activityId = activityCard.dataset.activityId;
                    currentActivityId = activityId;
                    
                    // 检查是否已报名
                    if (this.classList.contains('registered')) {
                        alert('您已经报名了这个活动');
                        return;
                    }
                    
                    // 显示确认弹窗
                    const modal = document.getElementById('registerModal');
                    const message = document.getElementById('modalMessage');
                    
                    // 动态设置消息内容
                    const activityTitle = activityCard.querySelector('.activity-title').textContent;
                    message.textContent = `您确定要报名参加 "${activityTitle}" 吗？`;
                    
                    modal.classList.add('show');
                });
            });

            // 弹窗确认按钮
            document.getElementById('confirmBtn').addEventListener('click', function() {
                if (currentActivityId) {
                    // 模拟报名成功
                    const activityCard = document.querySelector(`[data-activity-id="${currentActivityId}"]`);
                    if (activityCard) {
                        const registerBtn = activityCard.querySelector('.register-btn');
                        registerBtn.textContent = '已报名';
                        registerBtn.classList.add('registered');
                        
                        // 添加到已报名集合
                        currentUserRegistered.add(currentActivityId);
                    }
                    
                    // 显示成功提示
                    showSuccessToast('报名成功！');
                }
                
                closeRegisterModal();
            });

            // 弹窗取消按钮
            document.getElementById('cancelBtn').addEventListener('click', closeRegisterModal);

            // 弹窗背景点击关闭
            document.getElementById('registerModal').addEventListener('click', function(e) {
                if (e.target === this) {
                    closeRegisterModal();
                }
            });

            // 底部导航切换
            const navItems = document.querySelectorAll('.nav-item');
            navItems.forEach(item => {
                item.addEventListener('click', function() {
                    // 移除所有激活状态
                    navItems.forEach(i => i.classList.remove('active'));
                    // 添加当前激活状态
                    this.classList.add('active');
                    
                    const page = this.dataset.page;
                    handleNavigation(page);
                });
            });

            // 搜索按钮
            document.getElementById('searchBtn').addEventListener('click', function() {
                alert('跳转到搜索页面');
            });

            // 消息按钮
            document.getElementById('messageBtn').addEventListener('click', function() {
                alert('跳转到消息中心');
            });
        }

        // 关闭报名弹窗
        function closeRegisterModal() {
            const modal = document.getElementById('registerModal');
            modal.classList.remove('show');
        }

        // 处理导航切换
        function handleNavigation(page) {
            switch(page) {
                case 'home':
                    // 首页无需特殊处理
                    break;
                case 'search':
                    alert('跳转到搜索页面');
                    break;
                case 'publish':
                    alert('跳转到发布页面');
                    break;
                case 'profile':
                    alert('跳转到个人中心');
                    break;
            }
        }

        // 显示加载状态
        function showLoading() {
            const loading = document.getElementById('loadingIndicator');
            loading.style.display = 'block';
        }

        // 隐藏加载状态
        function hideLoading() {
            const loading = document.getElementById('loadingIndicator');
            loading.style.display = 'none';
        }

        // 模拟加载效果
        function simulateLoading() {
            showLoading();
            setTimeout(() => {
                hideLoading();
            }, 1500);
        }

        // 显示成功提示
        function showSuccessToast(message) {
            // 创建临时toast元素
            const toast = document.createElement('div');
            toast.textContent = message;
            toast.style.cssText = `
                position: fixed;
                bottom: 20px;
                left: 50%;
                transform: translateX(-50%);
                background-color: #4caf50;
                color: white;
                padding: 12px 24px;
                border-radius: 8px;
                box-shadow: 0 4px 12px rgba(0,0,0,0.15);
                z-index: 1001;
                animation: fadeInOut 3s ease-in-out;
            `;
            
            // 添加动画样式
            const style = document.createElement('style');
            style.textContent = `
                @keyframes fadeInOut {
                    0% { opacity: 0; transform: translateX(-50%) translateY(20px); }
                    10% { opacity: 1; transform: translateX(-50%) translateY(0); }
                    90% { opacity: 1; transform: translateX(-50%) translateY(0); }
                    100% { opacity: 0; transform: translateX(-50%) translateY(20px); }
                }
            `;
            document.head.appendChild(style);
            
            document.body.appendChild(toast);
            
            // 3秒后移除
            setTimeout(() => {
                toast.remove();
                style.remove();
            }, 3000);
        }

        // 活动卡片点击事件
        document.querySelectorAll('.activity-card').forEach(card => {
            card.addEventListener('click', function() {
                const activityId = this.dataset.activityId;
                alert(`查看活动详情：${activityId}`);
            });
        });

        // 添加卡片加载动画
        const activityCards = document.querySelectorAll('.activity-card');
        activityCards.forEach((card, index) => {
            card.style.animationDelay = `${index * 0.1}s`;
        });

        // 添加触摸反馈效果
        const buttons = document.querySelectorAll('button');
        buttons.forEach(button => {
            button.addEventListener('touchstart', function() {
                this.style.transform = 'scale(0.95)';
            });
            
            button.addEventListener('touchend', function() {
                this.style.transform = 'scale(1)';
            });
        });

        // 添加页面滚动效果
        let lastScrollTop = 0;
        window.addEventListener('scroll', function() {
            const scrollTop = window.pageYOffset || document.documentElement.scrollTop;
            
            // 隐藏/显示底部导航
            const bottomNav = document.querySelector('.bottom-nav');
            if (scrollTop > lastScrollTop && scrollTop > 100) {
                bottomNav.style.transform = 'translateY(100%)';
            } else {
                bottomNav.style.transform = 'translateY(0)';
            }
            
            lastScrollTop = scrollTop;
        });

        // 添加返回顶部功能
        window.addEventListener('scroll', function() {
            if (window.pageYOffset > 300) {
                // 可以添加返回顶部按钮
            }
        });
    </script>
</body>
</html>
